<?php
/**
 * 文件名：topic.mod.php
 * @version $Id: topic.mod.php 3664 2013-05-21 08:01:00Z wuliyong $
 * 作者：狐狸<foxis@qq.com>
 * 功能描述: 微博话题模块
 */
if (! defined ( 'IN_JISHIGOU' )) {
	exit ( 'invalid request' );
}
class ModuleObject extends MasterObject {
	var $ShowConfig;
	var $CacheConfig;
	var $TopicLogic;
	var $ID = '';
	function ModuleObject($config) {
		$this->MasterObject ( $config );
		
		$this->TopicLogic = jlogic ( 'topic' );
		$this->ChannelLogic = jlogic ( 'channel' );
		
		$this->CacheConfig = ConfigHandler::get ( 'cache' );
		
		$this->ShowConfig = ConfigHandler::get ( 'show' );
		
		$this->Execute ();
	}
	function Execute() {
		ob_start ();
		$this->nanbotoo();
		$body = ob_get_clean ();
		$this->ShowBody ( $body );
	}
	function nanbotoo() {
		// 去掉判断,首页必须出现幻灯片
		// 获取首页幻灯片
		($slide_config = ConfigHandler::get ( 'slide' )) && $slide_config [enable] && $slide_config ['list'];
		// 获取活动
		load::logic ( 'event' );
		$EventLogic = new EventLogic ();
		$param = array (
				'where' => " a.verify = 1 and a.item_id=0",
				'order' => 'order by a.id DESC ',
				'limit' => 'limit 10' 
		);
		$return = array ();
		$return = $EventLogic->getEventInfo ( $param );
		$event_list = $return ['event_list'];
		if ($event_list) {
			rsort ( $event_list );
			$event_first = $event_list ['0'];
			array_shift ( $event_list );
		}
		//获取兔友最新评论
		$param=array();
		$param['order']='tid desc';
		$param['limit']=6;
		$param['where']="type='first' and content not like '<T>#意见反馈#</T>%'";
		
		$TopicListLogic = jlogic ( 'topic_list' );
		$info=$TopicListLogic->get_data($param);
		$topic_list=$info['list'];
		//获取最新圈子
		Load::logic('qun');
		$qunLogic = new QunLogic();
		$new_qun_list = $qunLogic->getNewQun();
		//获取最新的用户
		$channelLogic = jlogic('channel');
		$userfanstop =  $channelLogic->getLastUser();
		//游记
		Load::logic('journals');
		$journalsLogic=new JournalsLogic();
		$param=array();
		$param['order']='order by id desc';
		$param['limit']='limit 10';
		$param['where']=' 1 ';
		$info=$journalsLogic->getJournalsInfo($param);
		$journals_list=$info['journals_list'];
		//查询最新户外知识
		Load::logic('article');
		$articleLogic=new ArticleLogic();
		$param=array();
		$param['order']='order by id desc';
		$param['limit']='limit 10';
		$param['where']=' 1 ';
		$info=$articleLogic->getarticleInfo($param);
		$article_list=$info['article_list'];
		include (template ( 'nanbotoo' ));
	}
}

?>